package com.heartbeat.domain;

import java.io.Serializable;
import java.util.Date;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="site"
 *     
*/
public class Site implements Serializable {

    /** identifier field */
    private Integer id;

    /** persistent field */
    private String name;

    /** persistent field */
    private String url;

    /** nullable persistent field */
    private Integer rank;

    /** persistent field */
    private byte type;

    /** nullable persistent field */
    private String regularEx;

    /** nullable persistent field */
    private Date lastSpidTime;

    /** nullable persistent field */
    private Boolean status;

    /** nullable persistent field */
    private String codeType;

    /** full constructor */
    public Site(String name, String url, Integer rank, byte type, String regularEx, Date lastSpidTime, Boolean status, String codeType) {
        this.name = name;
        this.url = url;
        this.rank = rank;
        this.type = type;
        this.regularEx = regularEx;
        this.lastSpidTime = lastSpidTime;
        this.status = status;
        this.codeType = codeType;
    }

    /** default constructor */
    public Site() {
    }

    /** minimal constructor */
    public Site(String name, String url, byte type) {
        this.name = name;
        this.url = url;
        this.type = type;
    }

    /** 
     *            @hibernate.id
     *             generator-class="identity"
     *             type="java.lang.Integer"
     *             column="id"
     *             unsaved-value="0"
     *         
     */
    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    /** 
     *            @hibernate.property
     *             column="name"
     *             length="100"
     *             not-null="true"
     *         
     */
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /** 
     *            @hibernate.property
     *             column="url"
     *             length="150"
     *             not-null="true"
     *         
     */
    public String getUrl() {
        return this.url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    /** 
     *            @hibernate.property
     *             column="rank"
     *             length="5"
     *         
     */
    public Integer getRank() {
        return this.rank;
    }

    public void setRank(Integer rank) {
        this.rank = rank;
    }

    /** 
     *            @hibernate.property
     *             column="type"
     *             length="2"
     *             not-null="true"
     *         
     */
    public byte getType() {
        return this.type;
    }

    public void setType(byte type) {
        this.type = type;
    }

    /** 
     *            @hibernate.property
     *             column="regularEx"
     *             length="500"
     *         
     */
    public String getRegularEx() {
        return this.regularEx;
    }

    public void setRegularEx(String regularEx) {
        this.regularEx = regularEx;
    }

    /** 
     *            @hibernate.property
     *             column="lastSpidTime"
     *             length="19"
     *         
     */
    public Date getLastSpidTime() {
        return this.lastSpidTime;
    }

    public void setLastSpidTime(Date lastSpidTime) {
        this.lastSpidTime = lastSpidTime;
    }

    /** 
     *            @hibernate.property
     *             column="status"
     *             length="1"
     *         
     */
    public Boolean getStatus() {
        return this.status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    /** 
     *            @hibernate.property
     *             column="codeType"
     *             length="20"
     *         
     */
    public String getCodeType() {
        return this.codeType;
    }

    public void setCodeType(String codeType) {
        this.codeType = codeType;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("id", getId())
            .toString();
    }

}
